{extend name="web/public/base" /}
{block name="header"}
{/block}
{block name="main"}
<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li><a><i class="fa fa-home"></i> 首页</a></li>
        <li class="active">会员管理</li>
        <li class="active">{$title}</li>
    </ul>
    <div class="row">
        <div class="col-sm-12">
            <section class="panel panel-default">
                <header class="panel-heading"> {$title}</header>
                {include file="web/public/search" /}
                {notempty name="_list"}
                <div class="table-responsive">
                    <table class="table table-striped table-hover b-t b-light text-sm">
                        <thead>
                        <tr>
                            <th>会员账号[会员姓名]</th>
                            <th>联系方式</th>
                            <th>收货地址</th>
                            <th>申请时间</th>
                            <th>发货数量</th>
                            <th>发货时间</th>
                            <th>完结时间</th>
                            <!--<th>报单中心</th>-->
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name='_list' id='vo'}
                        <tr>
                            <td>{$vo.uid|getInfo='usernumber',###}[{$vo.uid|getInfo='realname',###}]</td>
                            <td>{$vo.uid|getInfo='mobile',###}</td>
                            <td>{$vo.address}</td>
                            <td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
                            <td>{$vo.num1}件600元商品，{$vo.num2}件3000元商品</td>
                            <td>
                                {if condition="$vo['send_time'] gt 0"}
                                {$vo.send_time|date='Y-m-d H:i:s',###}
                                {else/}
                                暂无
                                {/if}
                            </td>
                            <td>
                                {if condition="$vo['finish_time'] gt 0"}
                                {$vo.finish_time|date='Y-m-d H:i:s',###}
                                {else/}
                                暂无
                                {/if}
                            </td>
                            <td>
                                {eq name="vo.status" value="1"}待发货{/eq}
                                {eq name="vo.status" value="2"}已发货{/eq}
                                {eq name="vo.status" value="3"}已完结{/eq}
                            </td>
                            <td>
                                {eq name="vo.status" value="1"}
                                <button class="btn btn-danger" onclick="send({$vo.id});return false;">发货</button>
                                {else/}
                                暂无！
                                {/eq}
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
                <footer class="panel-footer">
                    <div class="row">
                        <div class="text-right text-center-xs">
                            {$page}
                        </div>
                    </div>
                </footer>
                {else/}
                <div style="text-align: center">
                    <image src="__PUBLIC__/images/empty.jpg"></image>
                </div>
                {/notempty}
            </section>
        </div>
    </div>
</section>
{/block}
{block name="script"}
<script type="text/javascript">
    function send(id) {
        layer.confirm('确定发货吗？',
            function () {
                var index = layer.load('正在跳转，请耐心等待');
                $.post("{:url('send')}", {id: id}, function (data) {
                    layer.close(index);
                    layer.msg(data.msg, function () {
                        location.reload();
                    });
                }, "json");
                return false;
            }
        )
    }
</script>
{/block}
{block name="footer"}
{/block}